.TH "/home/nicola/public_html/elgg/mod/mtcd/start.php" 3 "Mon Feb 13 2012" "Version 0.1" "MTCDElggPlugin" \" -*- nroff -*-
.ad l
.nh
.SH NAME
/home/nicola/public_html/elgg/mod/mtcd/start.php \- 
.SH SYNOPSIS
.br
.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBwrite_log\fP ($text)"
.br
.RI "\fIWrite a row in the log file'\&. \fP"
.ti -1c
.RI "\fBget_synonyms\fP ($word)"
.br
.RI "\fIGet a list of synonyms of a word'\&. \fP"
.ti -1c
.RI "\fBget_hypernyms\fP ($word)"
.br
.RI "\fIGet a list of hypernyms of a word'\&. \fP"
.ti -1c
.RI "\fBget_dictionary\fP ($metaname, $type)"
.br
.RI "\fICreate a dictionary of words associated with other words which are related in some way'\&. \fP"
.ti -1c
.RI "\fBgenerate_dataset\fP ($synonyms, $hypernyms, $type, $subtypes=ELGG_ENTITIES_NO_VALUE)"
.br
.RI "\fIGet and filter data from Elgg database to produce a dataset for the clustering procedure'\&. \fP"
.ti -1c
.RI "\fBwrite_arff\fP ($relation, $attributes, $data)"
.br
.RI "\fIFormatting a dataset and write it in an ARFF file'\&. \fP"
.ti -1c
.RI "\fBget_clusters\fP ($relation, $number_of_cluster)"
.br
.RI "\fIUse simple k-means to obtain omogeneous clusters of entities'\&. \fP"
.ti -1c
.RI "\fBdelete_clusters\fP ($type)"
.br
.RI "\fIDelete all clusters of a given type'\&. \fP"
.ti -1c
.RI "\fBsave_clusters\fP ($clusters, $type)"
.br
.RI "\fISave all clusters and create the relationships between the clusters and the contained entities'\&. \fP"
.ti -1c
.RI "\fBinit_clustering\fP ($type, $subtype=ELGG_ENTITIES_NO_VALUE)"
.br
.RI "\fIIteratively performs the clustering process by changing the K value until the clusters cardinality isn't less than the maximum allowed'\&. \fP"
.ti -1c
.RI "\fBclustering\fP ($hook, $entity_type, $returnvalue, $params)"
.br
.RI "\fIClustering procedure'\&. \fP"
.ti -1c
.RI "\fBrecommender_init\fP ()"
.br
.RI "\fIInizialize the plugin'\&. \fP"
.ti -1c
.RI "\fBdeactivation\fP ()"
.br
.RI "\fIRemove all clusters and the subtype cluster'\&. \fP"
.in -1c
.SH "Function Documentation"
.PP 
.SS "clustering ($hook, $entity_type, $returnvalue, $params)"
.PP
Clustering procedure'\&. Called by Cron once a week'\&. 
.PP
\fBParameters:\fP
.RS 4
\fI$hook\fP Used by cron, how set by elgg core developer'\&. 
.br
\fI$entity_type\fP Used by cron, how set by elgg core developer'\&. 
.br
\fI$returnvalue\fP Used by cron, how set by elgg core developer'\&. 
.br
\fI$params\fP Used by cron, how set by elgg core developer'\&. 
.RE
.PP

.PP
Definition at line 351 of file start\&.php'\&.
.PP
References write_log(), get_dictionary(), $plugin, $settings, generate_dataset(), and init_clustering()\&.
.SS "deactivation ()"
.PP
Remove all clusters and the subtype cluster'\&. Called when the plugin is deactiveted'\&. 
.PP
Definition at line 399 of file start\&.php'\&.
.PP
References delete_clusters()\&.
.SS "delete_clusters ($type)"
.PP
Delete all clusters of a given type'\&. \fBParameters:\fP
.RS 4
\fI$type\fP Type of cluster to be deleted'\&. 
.RE
.PP

.PP
Definition at line 269 of file start\&.php'\&.
.PP
Referenced by save_clusters(), and deactivation()\&.
.SS "generate_dataset ($synonyms, $hypernyms, $type, $subtypes = \fCELGG_ENTITIES_NO_VALUE\fP)"
.PP
Get and filter data from Elgg database to produce a dataset for the clustering procedure'\&. \fBParameters:\fP
.RS 4
\fI$synonyms\fP Dictionary of all synonyms found between descriptors'\&. 
.br
\fI$hypernyms\fP Dictionary of all hypernyms found between descriptors'\&. 
.br
\fI$type\fP Type of entity on which build dataset'\&. 
.br
\fI$subtypes\fP Subtypes of entity on which build dataset'\&. 
.RE
.PP

.PP
Definition at line 145 of file start\&.php'\&.
.PP
References write_arff()\&.
.PP
Referenced by clustering()\&.
.SS "get_clusters ($relation, $number_of_cluster)"
.PP
Use simple k-means to obtain omogeneous clusters of entities'\&. \fBParameters:\fP
.RS 4
\fI$relation\fP Dataset relation to be clustered'\&. 
.br
\fI$number_of_cluster\fP Number of cluster that algorithm have to return'\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
List of cluster'\&. A cluster is a list of entity GIUDs'\&. 
.RE
.PP

.PP
Definition at line 223 of file start\&.php'\&.
.PP
References $plugin, $settings, and write_log()\&.
.PP
Referenced by init_clustering()\&.
.SS "get_dictionary ($metaname, $type)"
.PP
Create a dictionary of words associated with other words which are related in some way'\&. \fBParameters:\fP
.RS 4
\fI$metaname\fP List of descriptors names between tags, interests or both'\&. 
.br
\fI$type\fP Type of dictionary between synonyms and hypernyms'\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
Dictionary of all synonyms or hypernyms found between descriptors'\&. 
.RE
.PP

.PP
Definition at line 94 of file start\&.php'\&.
.PP
References get_hypernyms(), get_synonyms(), and write_log()\&.
.PP
Referenced by clustering()\&.
.SS "get_hypernyms ($word)"
.PP
Get a list of hypernyms of a word'\&. \fBParameters:\fP
.RS 4
\fI$word\fP The word to get hypernyms'\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
List of word hypernyms'\&. 
.RE
.PP

.PP
Definition at line 54 of file start\&.php'\&.
.PP
References $plugin\&.
.PP
Referenced by get_dictionary()\&.
.SS "get_synonyms ($word)"
.PP
Get a list of synonyms of a word'\&. \fBParameters:\fP
.RS 4
\fI$word\fP The word to get synonyms'\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
List of word synonyms'\&. 
.RE
.PP

.PP
Definition at line 22 of file start\&.php'\&.
.PP
References $plugin\&.
.PP
Referenced by get_dictionary()\&.
.SS "init_clustering ($type, $subtype = \fCELGG_ENTITIES_NO_VALUE\fP)"
.PP
Iteratively performs the clustering process by changing the K value until the clusters cardinality isn't less than the maximum allowed'\&. \fBParameters:\fP
.RS 4
\fI$type\fP Type of entity on which performs the clustering process'\&. 
.br
\fI$subtype\fP Subtype of entity on which performs the clustering process'\&. 
.RE
.PP

.PP
Definition at line 309 of file start\&.php'\&.
.PP
References write_log(), get_clusters(), and save_clusters()\&.
.PP
Referenced by clustering()\&.
.SS "recommender_init ()"
.PP
Inizialize the plugin'\&. Called when the system is initialized'\&. 
.PP
Definition at line 390 of file start\&.php'\&.
.SS "save_clusters ($clusters, $type)"
.PP
Save all clusters and create the relationships between the clusters and the contained entities'\&. \fBParameters:\fP
.RS 4
\fI$clusters\fP List of clusters'\&. A cluster is a list of entity GIUDs'\&. 
.br
\fI$type\fP The type of cluster'\&. 
.RE
.PP

.PP
Definition at line 282 of file start\&.php'\&.
.PP
References delete_clusters()\&.
.PP
Referenced by init_clustering()\&.
.SS "write_arff ($relation, $attributes, $data)"
.PP
Formatting a dataset and write it in an ARFF file'\&. If the file not exists it will be create'\&. 
.PP
\fBParameters:\fP
.RS 4
\fI$relation\fP Dataset relation'\&. 
.br
\fI$attributes\fP List of dataset attributes'\&. 
.br
\fI$data\fP List of dataset data'\&. 
.RE
.PP

.PP
Definition at line 193 of file start\&.php'\&.
.PP
Referenced by generate_dataset()\&.
.SS "write_log ($text)"
.PP
Write a row in the log file'\&. If the log file not exists it will be create'\&. 
.PP
\fBParameters:\fP
.RS 4
\fI$text\fP The sentence to be logged'\&. 
.RE
.PP

.PP
Definition at line 9 of file start\&.php'\&.
.PP
Referenced by get_dictionary(), get_clusters(), init_clustering(), and clustering()\&.
.SH "Author"
.PP 
Generated automatically by Doxygen for MTCDElggPlugin from the source code'\&.
